//过滤属性
function filterKey(obj,keyName){
	var NewObj=JSON.stringify(obj)
	NewObj=JSON.parse(NewObj)
	keyName.forEach(item=>{
		Reflect.deleteProperty(NewObj,item)
	})
	return NewObj;
}

module.exports=function(req,res,table){
	var user=req.user
	table.warehouse.getDate(user._id).then(
		result=>{
			result.prototype={}
			//过滤属性
			var keys=['_id'];
			result=filterKey(result,keys)
			res.send({state:200,...result})
		}
	)
}

